# -- coding: utf-8 --
# Name: app

from flask import Flask,render_template,url_for,request,send_from_directory
import os,time,platform
from os import path
from werkzeug.utils import secure_filename

app = Flask(__name__)


@app.route('/',methods=('GET','POST'))
def hello_world():
    if request.method == "GET":
        return render_template('upload.html')
    else:
        f = request.files['file']
        filename = secure_filename(f.filename)
        f.save(path.join('static/uploads',filename))
        return "upload success"

if __name__ == '__main__':
    app.run(debug=True)









